﻿using System;
using System.Runtime.Serialization;

namespace FileMonitor.Service.ProcessMonitor.Model
{
    [Flags]
    public enum FileState
    {
        NonProcessBinding = -3,
        Error = -2,
        ToBeProcess = -1,
        Processing = 0,
        Processed = 1,
        AllInProcessBinding=2,
        All=3
    }

    [DataContract]
    public class FileInfo
    {
        private string _fileName;
        private string _fullPath;
       
        private FileState _state;
        private int _recordsCounts;
        private DateTime _createdDate;
 
        private DateTime _processedDate;
        private long _fileSize;
        private string _errorMessage;

        [DataMember]
        public string FileName
        {
            get {return  this._fileName; }
            set { this._fileName = value; }
        }

        [DataMember]
        public string FullPath
        {
            get { return this._fullPath; }
            set { this._fullPath = value; }
        }

        [DataMember]
        public FileState State
        {
            get { return this._state; }
            set { this._state = value; }
        }

        [DataMember]
        public int RecordCounts
        {
            get { return this._recordsCounts; }
            set { this._recordsCounts = value; }
        }

        [DataMember]
        public DateTime CreatedDate
        {
            get { return this._createdDate; }
            set { this._createdDate = value; }
        }

         [DataMember]
        public DateTime ProcessedDate
        {
            get { return this._processedDate; }
            set { this._processedDate = value; }
        }

        [DataMember]
        public long Size
        {
            get { return this._fileSize; }
            set { this._fileSize = value; }
        }

        [DataMember]
        public string ErrorMessage
        {
            get { return this._errorMessage; }
            set { this._errorMessage = value; }
        }

        public FileInfo(string FileName)
        {
            this._fileName = FileName;
        }
    }
}
